import React, { useEffect, useState } from 'react';
import Markdown from 'markdown-to-jsx';

import styles from './index.less';

export default (props: { source: string }) => {
  const options = {
    slugify: (str: any) => str,
  };

  useEffect(() => {});

  return (
    <div className={styles.bg}>
      <Markdown
        className={styles.post}
        options={options}
        children={props.source}
      />
    </div>
  );
};
